$.pickUp = function(lHTTP,lPop,$scope){
    var userTrueMoney = 0.0;

    //$.getJSON(requestHost+"UserGet?callback=?&access_token="+access_token,function(json){
        lHTTP.jsonp("/UserGet?static=1")
            .success(function(json,status){
        //储存用户金额
        userMoney = parseFloat(json.user.money);
        //储存用户赠送金额
        presentMoney = parseFloat(json.user.presentMoney);

        userTrueMoney = userMoney-presentMoney;

        $('.pick-up .pickup-money').attr('placeholder','可提现金额：'+userTrueMoney+'元');
    });




    $('.pick-up .pickup-button').click(function(){
        if(isNaN($('.pick-up .pickup-money').val()) || $('.pick-up .pickup-money').val() == ""){
            //$.popUpMessage(4, "申请失败", "", "请输入提现金额", null, null,null, 0);
            lPop.popSet(2 , $scope ,"申请失败" ,undefined , "images/wrong-icon.png" , undefined,undefined , "请输入提现金额" , undefined,3000);
            return false;
        }
        var pickupMoney = parseFloat($('.pick-up .pickup-money').val())
        if(userMoney < pickupMoney){
            //$.popUpMessage(4, "申请失败", "", "提现金额大于账户金额", null, null,null, 0);
            lPop.popSet(2 , $scope ,"申请失败" ,undefined , "images/wrong-icon.png" , undefined,undefined , "提现金额大于账户金额" , undefined,3000);
            return false;
        }
        else{
            //$.getJSON(requestHost+"cashPickup?callback=?&access_token="+access_token+"&cashPickup="+pickupMoney,function(json){
                lHTTP.jsonp("/cashPickup?cashPickup="+pickupMoney)
                    .success(function(json,status){
                if(json.result == 1){
                    userTrueMoney = userTrueMoney-pickupMoney;
                    $('.pick-up .pickup-money').attr('placeholder','可提现金额：'+userTrueMoney+'元');
                    //$.popUpMessage(1, "申请成功", "来电将快速处理", "确定", null, null,null, 1);
                    lPop.popSet(1 , $scope ,"申请成功" ,"1~5个工作日内到账" , "images/right-icon.png" , undefined,undefined , "确定" , undefined,undefined);
                }
                else{
                    //$.popUpMessage(4, "申请失败", "", "确定", null, null,null, 1);
                    lPop.popSet(2 , $scope ,"申请失败" ,undefined , "images/wrong-icon.png" , undefined,undefined , "确定" , undefined,3000);
                }
            })
        }
    });
}